def hex_bytes_to_str(hex_bytes):
    print('hex_bytes', hex_bytes)
    return hex_bytes.decode('utf-8')


def str_to_hex_bytes(s):
    # 将ASCII字符串转为字节
    ascii_bytes = s.encode('ascii')
    # 将ASCII字节转为16进制字符串并返回
    return bytes.fromhex(ascii_bytes.hex())

